# Contributor: André Klitzing <aklitzing@gmail.com>
# Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=py3-h2
_pkgname=hyper-h2
pkgver=3.2.0
pkgrel=1
pkgdesc="HTTP/2 State-Machine based protocol implementation"
url="https://python-hyper.org/h2/"
arch="noarch"
license="MIT"
depends="
	python3
	py3-hyperframe
	py3-hpack
	"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-hypothesis"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-hyper/hyper-h2/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-h2" # Backwards compatibility
provides="py-h2=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="103a4ea2cd29037ce03ae676864125b4111c7d31a82bbbe7028557da886d88fb5363d885f08d5d3f68dfa29013b7b03350cc0cb4d9dddf32735e98dae5d7fc7c  py3-h2-3.2.0.tar.gz"
